package com.gitee.web.controller;

import com.gitee.business.entity.UserPo;
import com.gitee.core.common.web.BaseController;
import com.gitee.web.service.UserServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


/**
 * @author zhang_tao6
 * @className UserController
 * @description
 * @date 2017-10-26 17:07
 */
@Controller
@RequestMapping("/user")
@Slf4j
public class UserController extends BaseController {

    @Autowired
    private UserServiceImpl userService;


    @RequestMapping("/selectAll")
    @ResponseBody
    public List<UserPo> selectAll(Model model) {
        log.info("调用selectAll方法");
        List<UserPo> list = userService.selectAll(0, 10);
        return list;
    }


}
